package com.ruoyi.business.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.HurtQuestionnaireScoreMapper;
import com.ruoyi.business.domain.HurtQuestionnaireScore;
import com.ruoyi.business.service.IHurtQuestionnaireScoreService;

/**
 * 患者疼痛量化得分
Service业务层处理
 *
 * @author ruoyi
 * @date 2024-04-20
 */
@Service
public class HurtQuestionnaireScoreServiceImpl implements IHurtQuestionnaireScoreService
{
    @Autowired
    private HurtQuestionnaireScoreMapper hurtQuestionnaireScoreMapper;

    /**
     * 查询患者疼痛量化得分

     *
     * @param id 患者疼痛量化得分
主键
     * @return 患者疼痛量化得分

     */
    @Override
    public HurtQuestionnaireScore selectHurtQuestionnaireScoreById(Long id)
    {
        return hurtQuestionnaireScoreMapper.selectHurtQuestionnaireScoreById(id);
    }

    /**
     * 查询患者疼痛量化得分
列表
     *
     * @param hurtQuestionnaireScore 患者疼痛量化得分

     * @return 患者疼痛量化得分

     */
    @Override
    public List<HurtQuestionnaireScore> selectHurtQuestionnaireScoreList(HurtQuestionnaireScore hurtQuestionnaireScore)
    {
        return hurtQuestionnaireScoreMapper.selectHurtQuestionnaireScoreList(hurtQuestionnaireScore);
    }

    /**
     * 新增患者疼痛量化得分

     *
     * @param hurtQuestionnaireScore 患者疼痛量化得分

     * @return 结果
     */
    @Override
    public int insertHurtQuestionnaireScore(HurtQuestionnaireScore hurtQuestionnaireScore)
    {
        hurtQuestionnaireScore.setCreateTime(DateUtils.getNowDate());
        return hurtQuestionnaireScoreMapper.insertHurtQuestionnaireScore(hurtQuestionnaireScore);
    }

    /**
     * 修改患者疼痛量化得分

     *
     * @param hurtQuestionnaireScore 患者疼痛量化得分

     * @return 结果
     */
    @Override
    public int updateHurtQuestionnaireScore(HurtQuestionnaireScore hurtQuestionnaireScore)
    {
        return hurtQuestionnaireScoreMapper.updateHurtQuestionnaireScore(hurtQuestionnaireScore);
    }

    /**
     * 批量删除患者疼痛量化得分

     *
     * @param ids 需要删除的患者疼痛量化得分
主键
     * @return 结果
     */
    @Override
    public int deleteHurtQuestionnaireScoreByIds(Long[] ids)
    {
        return hurtQuestionnaireScoreMapper.deleteHurtQuestionnaireScoreByIds(ids);
    }

    /**
     * 删除患者疼痛量化得分
信息
     *
     * @param id 患者疼痛量化得分
主键
     * @return 结果
     */
    @Override
    public int deleteHurtQuestionnaireScoreById(Long id)
    {
        return hurtQuestionnaireScoreMapper.deleteHurtQuestionnaireScoreById(id);
    }

    @Override
    public Map<String, Object> getPatientLastScore(Long patientId) {
        return hurtQuestionnaireScoreMapper.getPatientLastScore(patientId);
    }

    @Override
    public List<Map<String, Object>> getPatientScoreList(Long patientId) {
        return hurtQuestionnaireScoreMapper.getPatientScoreList(patientId);
    }

    @Override
    public Map<String, Object> getPatientScoreDetail(Long id) {
        return hurtQuestionnaireScoreMapper.getPatientScoreDetail(id);
    }

    @Override
    public List<Map<String, Object>> getODIList(Long patientId) {
        return hurtQuestionnaireScoreMapper.getODIList(patientId);
    }

    @Override
    public List<Map<String, Object>> getVASList(Long patientId) {
        return hurtQuestionnaireScoreMapper.getVASList(patientId);
    }

    @Override
    public List<Map<String, Object>> getPCSList(Long patientId) {
        return hurtQuestionnaireScoreMapper.getPCSList(patientId);
    }

    @Override
    public List<Map<String, Object>> getMCSList(Long patientId) {
        return hurtQuestionnaireScoreMapper.getMCSList(patientId);
    }

    @Override
    public List<Map<String, Object>> getStandardList(Long patientId) {
        return hurtQuestionnaireScoreMapper.getStandardList(patientId);
    }

    @Override
    public Map<String, Object> getOdiAndVasByPatientId(Long patientId) {
        return hurtQuestionnaireScoreMapper.getOdiAndVasByPatientId(patientId);
    }

    @Override
    public List<Map<String, Object>> getOdiList(Long patientId) {
        return hurtQuestionnaireScoreMapper.getOdiList(patientId);
    }

    @Override
    public List<Map<String, Object>> getVasList(Long patientId) {
        return hurtQuestionnaireScoreMapper.getVasList(patientId);
    }
}
